package service;

import dao.FruitDao;
import entity.Fruit;

import java.util.List;

public class FruitService {
    FruitDao fruit = new FruitDao();
    public List<Fruit> list(int pageIndex,int pageSize) {
        return fruit.list(pageIndex,pageSize);
    }
    public Fruit selectId(int id) {
        return fruit.selectId(id);
    }
    public int  del(int fruitId) {
        return fruit.del(fruitId);
    }
    public int count(){
        return fruit.count();
    }
    public int add(Fruit fruit){
        return this.fruit.add(fruit);
    }
    //修改方法
    public int updata(Fruit fruit){
        return this.fruit.updata(fruit);
    }
}
